-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #45 +/- ##
===========================================
+ Coverage 19.82% 52.06% +32.24%
===========================================
Files 7 7
Lines 1281 1281
===========================================
+ Hits 254 667 +413
+ Misses 1017 540 -477
- Partials 10 74 +64
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a start, but there's still work to be done.
I'd strongly suggest having a look at the existing tests in python-tuf, and tuf-js for inspiration and ideas - that should help you get a better idea of what you should be testing and how the test cases should be organized.
13dd56e
to
6442a7f
Compare
This change adds repository data to use in unit testing, keeping it the same as in python-tuf Signed-off-by: Ivana Atanasova <[email protected]>
This change adds a mock for os functions Signed-off-by: Ivana Atanasova <[email protected]>
This change implements client simulator for working with local repositories Signed-off-by: Ivana Atanasova <[email protected]>
This change adds unit tests for part of the metadata methods Signed-off-by: Ivana Atanasova <[email protected]>
This change implements api unit tests for metadata with the same logic as in python-tuf Signed-off-by: Ivana Atanasova <[email protected]>
This change fixes go linter error of not checking errors returned by methods in the file system and test client simulators Signed-off-by: Ivana Atanasova <[email protected]>
a8ccbc1
to
c18678c
Compare
As the `signature` package allows loading keys from RSA PEM files only, the keys and roles from the python-tuf implementation are not suitable for the current implementation. This is why a clean repo is created with new keys in the appropriate format Signed-off-by: Ivana Atanasova <[email protected]>
This change adds test coverage for signing and verigying metadata with a pre-set keys Signed-off-by: Ivana Atanasova <[email protected]>
This change removes unused keys and test utils for the metadata unit tests. The removed test utils include filesystem simulator, which is replaced by the setup functionality and some tidy-up around the changes Signed-off-by: Ivana Atanasova <[email protected]>
This change updates error assertions in the metadata api tests to compare error types rather than only a message Signed-off-by: Ivana Atanasova <[email protected]>
dcd20b6
to
79357c2
Compare
Force-pushed a squash with the fixed roles json an the metadata repository, so that commits between them are not broken. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left several comments on things that need to be addressed but otherwise, it looks great 👍
This change provides improvements to the metadata api tests Signed-off-by: Ivana Atanasova <[email protected]>
9b6271b
to
cc2bfee
Compare
* Add test repository data This change adds repository data to use in unit testing, keeping it the same as in python-tuf Signed-off-by: Ivana Atanasova <[email protected]> * Add file system simulator This change adds a mock for os functions Signed-off-by: Ivana Atanasova <[email protected]> * Add test client simulator This change implements client simulator for working with local repositories Signed-off-by: Ivana Atanasova <[email protected]> * Add metadata unit tests This change adds unit tests for part of the metadata methods Signed-off-by: Ivana Atanasova <[email protected]> * Add metadata api tests This change implements api unit tests for metadata with the same logic as in python-tuf Signed-off-by: Ivana Atanasova <[email protected]> * Fix go linter in test simulators This change fixes go linter error of not checking errors returned by methods in the file system and test client simulators Signed-off-by: Ivana Atanasova <[email protected]> * Create clean test metadata repository As the `signature` package allows loading keys from RSA PEM files only, the keys and roles from the python-tuf implementation are not suitable for the current implementation. This is why a clean repo is created with new keys in the appropriate format Signed-off-by: Ivana Atanasova <[email protected]> * Add metadata sign/verify test This change adds test coverage for signing and verigying metadata with a pre-set keys Signed-off-by: Ivana Atanasova <[email protected]> * Cleanup unnecessary functionality This change removes unused keys and test utils for the metadata unit tests. The removed test utils include filesystem simulator, which is replaced by the setup functionality and some tidy-up around the changes Signed-off-by: Ivana Atanasova <[email protected]> * Fix metadata api tests to verify error type This change updates error assertions in the metadata api tests to compare error types rather than only a message Signed-off-by: Ivana Atanasova <[email protected]> * Improve metadata tests This change provides improvements to the metadata api tests Signed-off-by: Ivana Atanasova <[email protected]> --------- Signed-off-by: Ivana Atanasova <[email protected]> Co-authored-by: Ivana Atanasova <[email protected]>
This change adds unit tests for part of the metadata methods.